- 
                Notifications
    You must be signed in to change notification settings 
- Fork 140
Deploy WAF containers when enabled in NGINXProxy #3481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@               Coverage Diff                @@
##           feat/nap-waf    #3481      +/-   ##
================================================
+ Coverage         86.78%   86.94%   +0.16%     
================================================
  Files               127      127              
  Lines             15079    15308     +229     
  Branches             62       62              
================================================
+ Hits              13086    13310     +224     
- Misses             1841     1845       +4     
- Partials            152      153       +1     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| (FYI I think if you want to close multiple issues in one PR, you have to specify  | 
c3fd670    to
    1642f36      
    Compare
  
    1642f36    to
    f423ef0      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
* Add WAF dockerfile and make targets * Add WAF parameters to NGINXProxy resource * Review feedback * Add plus image path; add readOnlyRootFS to waf containers * Capitalise WAF
* Add WAF dockerfile and make targets * Add WAF parameters to NGINXProxy resource * Review feedback * Add plus image path; add readOnlyRootFS to waf containers * Capitalise WAF
Proposed changes
Problem: In order to enable NAP WAF protection for NGF traffic, we need to install the nap module in the NGINX container, provide a mechanism to deploy the additional WAF v5 containers in the NGINX deployment, and then set the base app_protect_* directives in the NGINX conf
Solution:
INCLUDE_NAP_WAF=trueNotes:
Testing: Deployed in GKE (NAP WAF does not run on arm64 and we can't use emulated images locally, so deploying NAP requires an amd64 architecture). Created the NAP enabled image, used NGINXProxy to set WAF to true, used user provided images for the waf containers (I cached them to the GCP registry), and I mounted an additional volume to NGINX and waf-config-mgr for bundles (as we don't have the next part developed yet). Once deployed, I used
kubectl cpto copy the bundle to the mounted volume. I used snippets to create the app protect directives at the server level, and checked that the firewall blocked the malicious appearing traffic.Closes #3451
Closes #3453
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.